package calvin.study.springboot.config.ioc;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

//Bean的扩展原理
@Configuration
@ComponentScan("calvin.study.springboot.config.ioc")
public class IocConfig {
	
	@Bean(initMethod="myInit",destroyMethod="myDestroy")
	public LifeCycleBean lifeCycleBean() {
		return new LifeCycleBean("小小");
	}

	//@Bean
	public GlobalTransactionScanner globalTransactionScanner() {
		return new GlobalTransactionScanner();
	}
		
}
